namespace tool {
class IConfigFile;
class IRequestDispatcher;
}
namespace env {
tool::IConfigFile* GetConfigFile();
tool::IRequestDispatcher* GetRequestDispatcher();
}
namespace tool {
template<typename T>
class Singleton {
 public:
  static T* Instance() {
   static T instance;
   return &instance;
  }
};
}
namespace tool {
class IConfigFile {
  public:
   virtual bool IsLoad() = 0;
   virtual uint32_t Load(std::string filename) = 0;
   virtual uint32_t GetValue(std::string key, uint32_t& v) = 0;
   virtual uint32_t GetValue(std::string key, std::string& v) = 0;
   virtual uint32_t GetValue(std::string key, std::list<uint32_t>& v) = 0;
   virtual uint32_t GetValue(std::string key, std::list<std::string>& v) = 0;
   virtual uint32_t GetValue(std::string key, std::map<uint32_t, uint32_t>& v) = 0;
   virtual uint32_t GetValue(std::string key, std::map<uint32_t, std::string>& v) = 0;
};
}
namespace tool {
typedef std::list<uint32_t> REQUEST_LIST;
class IRequestClient {
 public:
  virtual void OnRequest(pack::Request& request) = 0;
  virtual void RequestList(REQUEST_LIST& request_list) = 0;
};
}
namespace tool {
class IRequestClient;
class IRequestDispatcher {
 public:
  virtual void OnRequest(pack::Request& request) = 0;
  virtual void AddRequestClient(IRequestClient* client) = 0;
  virtual void RemoveRequestClient(IRequestClient* client) = 0;
};
}
